package com.dawn.sinaoption.common;

import java.util.Map;
import weibo4j.Weibo;

public class SinaCommon {

	public static final String FOLLOW_ERROR = "关注失败";
	public static final String FOLLOW_SELF_ERROR = "不可关注自己";
	public static final String REPEAT_FOLLOW_ERROR = "您已经在本站关注过此人";
	public static final String WEIBO_ERROR = "链接微博失败或您已经关注过此人";
	public static final String DATASOURCE_ERROR = "数据错误";

	public static Weibo getWeibo(Map<String, Object> session) {
		Weibo weibo = new Weibo();
		String accessToken = (String) session.get("accToken");
		String accessTokenSecret = (String) session.get("accTokenSecret");
		weibo.setToken(accessToken, accessTokenSecret);
		return weibo;
	}
}
